cmake_minimum_required (VERSION 2.8)

project (NotifyDemoC)

find_package(PkgConfig)
find_package(OpenSSL REQUIRED)

pkg_check_modules(GLib REQUIRED glib-2.0)
if(GLib_FOUND)
include_directories(${GLib_INCLUDE_DIRS})
link_libraries(${GLib_LIBRARIES})
endif(GLib_FOUND)
pkg_check_modules(Libnotify REQUIRED libnotify)
if(Libnotify_FOUND)
include_directories(${Libnotify_INCLUDE_DIRS})
link_libraries(${Libnotify_LIBRARIES})
endif(Libnotify_FOUND)
pkg_check_modules(DBus REQUIRED dbus-1)
if(DBus_FOUND)
include_directories(${DBus_INCLUDE_DIRS})
link_libraries(${DBus_LIBRARIES})
endif(DBus_FOUND)
pkg_check_modules(DBus-GLib REQUIRED dbus-glib-1)
if(DBus-GLib_FOUND)
include_directories(${DBus-GLib_INCLUDE_DIRS})
link_libraries(${DBus-GLib_LIBRARIES})
endif(DBus-GLib_FOUND)

include_directories(/usr/include/glib-2.0/glib/)


add_executable(notifyDemoC
    main.c
    notificationsclient.c
    notificationsclient.h
)

#target_link_libraries(notifyDemoC

#    )







#aux_source_directory(./src/auth-client SRC_MAIN)
#add_executable(${PROJECT_NAME} ${SOURCES})
#target_link_libraries(${PROJECT_NAME} libglib-2.0.so libdbus-1.so libdbus-glib-1.so OpenSSL::SSL OpenSSL::Crypto libnotify.so)
#set_target_properties(
#${PROJECT_NAME}
#PROPERTIES
#RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/../"
#)

#add_executable(kylin-notify ${SRC_NOTIFY_MAIN})
#target_link_libraries(kylin-notify libglib-2.0.so libdbus-1.so libdbus-glib-1.so OpenSSL::SSL OpenSSL::Crypto libnotify.so)
#set_target_properties(
#kylin-notify
#PROPERTIES
#RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/../"
#)
